<html>
<head><meta charset="utf-8"><title>Github issue etiquette · general · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/index.html">general</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html">Github issue etiquette</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="231949839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/231949839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pointerbender <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#231949839">(Mar 26 2021 at 11:34)</a>:</h4>
<p>Hi everyone, I'm curious about the status of a particular feature called <code>slice_ptr_len</code> (<a href="https://github.com/rust-lang/rust/issues/71146">https://github.com/rust-lang/rust/issues/71146</a>). It's been implemented on nightly, but currently a stabilization PR is blocked by another open issue. Its last update regarding this topic was in July 2020. What is the best way for me to reach out to the people involved in the github issue? I'm curious to learn if I could help in some way, if that is possible. Is the github tracking issue the right place for that or is there a better place for these inquiries? Thank you!</p>



<a name="231983789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/231983789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> NeoRaider <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#231983789">(Mar 26 2021 at 15:26)</a>:</h4>
<p>Depends on the question! Github is usually fine. Personally, I would ask in</p>
<ul>
<li><a href="https://github.com/rust-lang/rust/issues/71146">#71146</a> to discuss whether the stabilization really needs to be blocked by <a href="https://github.com/rust-lang/rust/issues/73987">#73987</a></li>
<li><a href="https://github.com/rust-lang/rust/issues/73987">#73987</a> if we want to come to a conclusion regarding that ticket, thus solving the potential blocker</li>
</ul>
<p>And I think I'll do the latter right now, as I implemented that feature.</p>



<a name="231992602"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/231992602" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pointerbender <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#231992602">(Mar 26 2021 at 16:19)</a>:</h4>
<p>Thank you <span class="user-mention" data-user-id="294290">@NeoRaider</span> ! And also thank you for implementing this feature, I'm very excited about it! :D</p>



<a name="232002863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232002863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> marmeladema <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232002863">(Mar 26 2021 at 17:23)</a>:</h4>
<p>(deleted)</p>



<a name="232110596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232110596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232110596">(Mar 27 2021 at 19:02)</a>:</h4>
<p><span class="user-mention" data-user-id="400735">@WonderConstant</span> I think in the case of this feature, the ball is with the libs team. I am concerned that stabilizing things as-is could be confusing, but it is up to t-libs to decide about the trade-off here.</p>



<a name="232110618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232110618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232110618">(Mar 27 2021 at 19:02)</a>:</h4>
<p>hence paging <span class="user-group-mention" data-user-group-id="2645">@T-libs</span></p>



<a name="232112044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232112044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232112044">(Mar 27 2021 at 19:24)</a>:</h4>
<p>Interesting issue. I'm not very concerned about ptr::len() here though. Someone doing <code>(*p).data</code> on a pointer that can't safely be used as a <code>&amp;</code> is probably very careful already, and it's clear enough that in <code>(*p).data.len()</code>, <code>.len()</code> is called on <code>data</code>, not a raw pointer to <code>data</code>.</p>



<a name="232112263"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232112263" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232112263">(Mar 27 2021 at 19:28)</a>:</h4>
<p>(<span class="user-mention" data-user-id="120791">@RalfJ</span> or am i missing some other more subtle issue here?)</p>



<a name="232116049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232116049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pointerbender <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232116049">(Mar 27 2021 at 20:26)</a>:</h4>
<p>Thank you <span class="user-mention" data-user-id="120791">@RalfJ</span> .  I'm curious to how this plays out and very much like the way you think and explain about this topic (especially the part about places vs values I found very insightful). In case more time is needed for more careful consideration for <code>*const T</code> and <code>*mut T</code>, just stabilizing <code>NonNull::&lt;T&gt;::len()</code> would also be helpful  for my use case (this indirectly makes length for all pointers available through <code>NonNull::new_unchecked(ptr).len()</code>, as long as these aren't null pointers, which covers a lot of use cases already).</p>



<a name="232116531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232116531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232116531">(Mar 27 2021 at 20:34)</a>:</h4>
<p><span class="user-mention silent" data-user-id="310399">Mara</span> <a href="#narrow/stream/122651-general/topic/Github.20issue.20etiquette/near/232112044">said</a>:</p>
<blockquote>
<p>Interesting issue. I'm not very concerned about ptr::len() here though. Someone doing <code>(*p).data</code> on a pointer that can't safely be used as a <code>&amp;</code> is probably very careful already, and it's clear enough that in <code>(*p).data.len()</code>, <code>.len()</code> is called on <code>data</code>, not a raw pointer to <code>data</code>.</p>
</blockquote>
<p>To me this makes little sense, you cannot call <code>.len</code> on <code>data</code> as <code>data</code> has type <code>[_]</code>, not <code>&amp;[_]</code></p>



<a name="232116554"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232116554" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232116554">(Mar 27 2021 at 20:35)</a>:</h4>
<p>so the compiler is inserting an <code>&amp;</code> here and thereby introducing assumptions the programmer did not make explicit and might not intend</p>



<a name="232116589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232116589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232116589">(Mar 27 2021 at 20:35)</a>:</h4>
<p>and of course there's a back-compat concern -- if we want to change method resolution in the future to use the raw ptr method here, could this break programs or change their behavior?</p>



<a name="232164923"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232164923" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> NeoRaider <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232164923">(Mar 28 2021 at 12:49)</a>:</h4>
<p>I don't think I'd ever want to implicitly use raw ptr methods, raw ptrs are too special. Autoref should always use references.</p>
<p>This would be another point for making place rules as strict as ref rules, as I suggested in <a href="#narrow/stream/213817-t-lang/topic/Alignment.20and.20raw.20pointer.20deref">https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Alignment.20and.20raw.20pointer.20deref</a> : So autoref is always valid.</p>



<a name="232166625"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232166625" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232166625">(Mar 28 2021 at 13:19)</a>:</h4>
<blockquote>
<p>This would be another point for making place rules as strict as ref rules, as I suggested in <a href="#narrow/stream/213817-t-lang/topic/Alignment.20and.20raw.20pointer.20deref">https://rust-lang.zulipchat.com/#narrow/stream/213817-t-lang/topic/Alignment.20and.20raw.20pointer.20deref</a> : So autoref is always valid.</p>
</blockquote>
<p>I don't see how that helps. The entire problem here is that it's not even clear that a place is being created!</p>



<a name="232176058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232176058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232176058">(Mar 28 2021 at 16:11)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120791">RalfJ</span> <a href="#narrow/stream/122651-general/topic/Github.20issue.20etiquette/near/232116554">said</a>:</p>
<blockquote>
<p>so the compiler is inserting an <code>&amp;</code> here and thereby introducing assumptions the programmer did not make explicit and might not intend</p>
</blockquote>
<p>how is that related to stabilizing ptr::len()? that's an entirely separate language/compiler issue, right?</p>



<a name="232179851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232179851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> RalfJ <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232179851">(Mar 28 2021 at 17:15)</a>:</h4>
<p>it's related in that <code>ptr::len</code> makes it more likely that would would write this code, trying to call the raw ptr method</p>



<a name="232586596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122651-general/topic/Github%20issue%20etiquette/near/232586596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Pointerbender <a href="https://rust-lang.github.io/zulip_archive/stream/122651-general/topic/Github.20issue.20etiquette.html#232586596">(Mar 31 2021 at 13:04)</a>:</h4>
<p>(In case this causes confusion, I changed my username from WonderConstant to Pointerbender. Someone else already registered my previous username on Reddit, so I chose a new one to be consistent through social media, just FYI :) )</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>